


export default class StructureSpawnExtension extends StructureSpawn {
    // isUsed?:boolean;
    spawnCreep(body: BodyPartConstant[], name: string, opts?: SpawnOptions): ScreepsReturnCode
    {
        if(this.room.isUsedRoomEnergy)
        {
            return ERR_BUSY
        }

        const ret =  this._spawnCreep(body,name,opts);
       // Memory.Debug[`[${Game.time}]_${this.name}_spawn`] = name;
        if(ret ===OK)
        {
            this.room.isUsedRoomEnergy=true;
        }

        return ret;
    }

}
